///////////////////////
// DeterPrime.java
// Chad Bunce
// 
// Contains methods for determining the primality of a number
//
///////////////////////
// TODO:- 1
///////////////////////
import static java.lang.Math.sqrt; // Use sparingly!!


// Deterministic method. Useable until number=10,000 or so. Should switch to probabilistic method then.
public boolean isPrime(int number) {
			// TODO:- Call Deterministic for number < 10,000, probabilistic > 10,000.
      if (number == 1)
            return false;
      if (number == 2)
            return true;
      if (number % 2 == 0)
            return false;
      for (int d = 3; d <= (int) sqrt(number); d++)
            if (number % d == 0)
                  return false;
      return true;
}